import 'package:school_assistant/generated/json/base/json_convert_content.dart';
import 'package:school_assistant/data/article_entity.dart';

ArticleEntity $ArticleEntityFromJson(Map<String, dynamic> json) {
  final ArticleEntity articleEntity = ArticleEntity();
  final int? ty = jsonConvert.convert<int>(json['ty']);
  if (ty != null) {
    articleEntity.ty = ty;
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    articleEntity.title = title;
  }
  final String? body = jsonConvert.convert<String>(json['body']);
  if (body != null) {
    articleEntity.body = body;
  }
  final int? like = jsonConvert.convert<int>(json['like']);
  if (like != null) {
    articleEntity.like = like;
  }
  final String? image = jsonConvert.convert<String>(json['image']);
  if (image != null) {
    articleEntity.image = image;
  }
  final String? extra = jsonConvert.convert<String>(json['extra']);
  if (extra != null) {
    articleEntity.extra = extra;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    articleEntity.id = id;
  }
  final String? user = jsonConvert.convert<String>(json['user']);
  if (user != null) {
    articleEntity.user = user;
  }
  return articleEntity;
}

Map<String, dynamic> $ArticleEntityToJson(ArticleEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['ty'] = entity.ty;
  data['title'] = entity.title;
  data['user'] = entity.user;
  data['body'] = entity.body;
  data['like'] = entity.like;
  data['image'] = entity.image;
  data['extra'] = entity.extra;
  data['id'] = entity.id;
  return data;
}
